<template>
    <div id="comb_view">
        <div id="game_241" class="game_view">
            <table class="u-table2 kuaijie_table">
                <thead>
                <tr>
                    <th colspan="12" style="display:none">正码</th>
                </tr>
                <tr>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                </tr>
                </thead>
                <tbody>
                    <TrItem :key="i" v-for="(row,i) in list[0]" :row="row" :bet-number="betNumber" :show-name="false"></TrItem>
                </tbody>
            </table>
            <table class="u-table2 mt10">
                <thead>
                <tr style="display:none">
                    <th>两面</th>
                </tr>
                </thead>
                <thead>
                <tr>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                    <th>号码</th>
                    <th>赔率</th>
                    <th>金额</th>
                </tr>
                </thead>
                <tbody>
                    <TrItem :key="i" v-for="(row,i) in list[1]" :row="row" :bet-number="betNumber" :show-numbers="false"></TrItem>
                </tbody>
            </table>
        </div>
    </div>
</template>

<script>
    import TrItem from "../components/TrItem";
    import {mapState} from "vuex";

    export default {
        name: 'ZhengMa',
        components: {TrItem},
        data() {
            return {
                list:[
                    // 号码
                    [
                        [
                            {id:23842,number:'01',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23843,number:'11',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23844,number:'21',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23845,number:'31',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23846,number:'41',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23847,number:'02',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23848,number:'12',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23849,number:'22',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23850,number:'32',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23851,number:'42',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23852,number:'03',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23853,number:'13',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23854,number:'23',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23855,number:'33',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23856,number:'43',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23857,number:'04',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23858,number:'14',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23859,number:'24',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23860,number:'34',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23861,number:'44',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23862,number:'05',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23863,number:'15',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23864,number:'25',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23865,number:'35',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23866,number:'45',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23867,number:'06',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23868,number:'16',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23869,number:'26',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23870,number:'36',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23871,number:'46',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23872,number:'07',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23873,number:'17',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23874,number:'27',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23875,number:'37',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23876,number:'47',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23877,number:'08',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23878,number:'18',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23879,number:'28',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23880,number:'38',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23881,number:'48',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23882,number:'09',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23883,number:'19',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23884,number:'29',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23885,number:'39',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23886,number:'49',bet:7.2,selected:false,hovering:false,amount:''}
                        ],
                        [
                            {id:23887,number:'10',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23888,number:'20',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23889,number:'30',bet:7.2,selected:false,hovering:false,amount:''},
                            {id:23890,number:'40',bet:7.2,selected:false,hovering:false,amount:''}
                        ]
                    ],
                    // 总玩法
                    [
                        [
                            {id:24842,name:'总和单',bet:1.98,selected:false,hovering:false,amount:''},
                            {id:24843,name:'总和双',bet:1.98,selected:false,hovering:false,amount:''},
                            {id:24844,name:'总和大',bet:1.98,selected:false,hovering:false,amount:''},
                            {id:24845,name:'总和小',bet:1.98,selected:false,hovering:false,amount:''},
                        ]
                    ]
                ]
            }
        },
        computed:{
            ...mapState(['betNumber'])
        },
        watch:{
            betNumber(nVal){
                this.list.forEach((arr)=>{
                    arr.forEach((item)=>{
                        item.forEach((o)=>{
                            if (o.selected) {
                                o.amount = nVal
                            }
                        })
                    })
                })
                this.$forceUpdate()
            }
        },
    }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
